Optimal. Leaf size=229 \[ -\frac {363 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{64 a^{5/2} d}+\frac {4 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a+a \sin (c+d x)}}\right )}{a^{5/2} d}+\frac {149 \cot (c+d x)}{64 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {107 \cot (c+d x) \csc (c+d x)}{96 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {17 \cot (c+d x) \csc ^2(c+d x)}{24 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d \sqrt {a+a \sin (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.86, antiderivative size = 229, normalized size of antiderivative = 1.00, number of steps
used = 18, number of rules used = 8, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {2959, 2858,
3063, 3064, 2728, 212, 2852, 3123} \begin {gather*} -\frac {363 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a \sin (c+d x)+a}}\right )}{64 a^{5/2} d}+\frac {4 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a \sin (c+d x)+a}}\right )}{a^{5/2} d}+\frac {149 \cot (c+d x)}{64 a^2 d \sqrt {a \sin (c+d x)+a}}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d \sqrt {a \sin (c+d x)+a}}+\frac {17 \cot (c+d x) \csc ^2(c+d x)}{24 a^2 d \sqrt {a \sin (c+d x)+a}}-\frac {107 \cot (c+d x) \csc (c+d x)}{96 a^2 d \sqrt {a \sin (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2728
Rule 2852
Rule 2858
Rule 2959
Rule 3063
Rule 3064
Rule 3123
Rubi steps
\begin {align*} \int \frac {\cot ^4(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^{5/2}} \, dx &=\frac {\int \frac {\csc ^5(c+d x) \left (1+\sin ^2(c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx}{a^2}-\frac {2 \int \frac {\csc ^4(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx}{a^2}\\ &=\frac {2 \cot (c+d x) \csc ^2(c+d x)}{3 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {\int \frac {\csc ^4(c+d x) \left (-\frac {a}{2}+\frac {15}{2} a \sin (c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx}{4 a^3}+\frac {\int \frac {\csc ^3(c+d x) (a-5 a \sin (c+d x))}{\sqrt {a+a \sin (c+d x)}} \, dx}{3 a^3}\\ &=-\frac {\cot (c+d x) \csc (c+d x)}{6 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {17 \cot (c+d x) \csc ^2(c+d x)}{24 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {\int \frac {\csc ^3(c+d x) \left (\frac {91 a^2}{4}-\frac {5}{4} a^2 \sin (c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx}{12 a^4}+\frac {\int \frac {\csc ^2(c+d x) \left (-\frac {21 a^2}{2}+\frac {3}{2} a^2 \sin (c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx}{6 a^4}\\ &=\frac {7 \cot (c+d x)}{4 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {107 \cot (c+d x) \csc (c+d x)}{96 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {17 \cot (c+d x) \csc ^2(c+d x)}{24 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {\int \frac {\csc ^2(c+d x) \left (-\frac {111 a^3}{8}+\frac {273}{8} a^3 \sin (c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx}{24 a^5}+\frac {\int \frac {\csc (c+d x) \left (\frac {27 a^3}{4}-\frac {21}{4} a^3 \sin (c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx}{6 a^5}\\ &=\frac {149 \cot (c+d x)}{64 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {107 \cot (c+d x) \csc (c+d x)}{96 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {17 \cot (c+d x) \csc ^2(c+d x)}{24 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {\int \frac {\csc (c+d x) \left (\frac {657 a^4}{16}-\frac {111}{16} a^4 \sin (c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx}{24 a^6}+\frac {9 \int \csc (c+d x) \sqrt {a+a \sin (c+d x)} \, dx}{8 a^3}-\frac {2 \int \frac {1}{\sqrt {a+a \sin (c+d x)}} \, dx}{a^2}\\ &=\frac {149 \cot (c+d x)}{64 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {107 \cot (c+d x) \csc (c+d x)}{96 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {17 \cot (c+d x) \csc ^2(c+d x)}{24 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {219 \int \csc (c+d x) \sqrt {a+a \sin (c+d x)} \, dx}{128 a^3}-\frac {2 \int \frac {1}{\sqrt {a+a \sin (c+d x)}} \, dx}{a^2}-\frac {9 \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{4 a^2 d}+\frac {4 \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{a^2 d}\\ &=-\frac {9 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{4 a^{5/2} d}+\frac {2 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a+a \sin (c+d x)}}\right )}{a^{5/2} d}+\frac {149 \cot (c+d x)}{64 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {107 \cot (c+d x) \csc (c+d x)}{96 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {17 \cot (c+d x) \csc ^2(c+d x)}{24 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {219 \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{64 a^2 d}+\frac {4 \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{a^2 d}\\ &=-\frac {363 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{64 a^{5/2} d}+\frac {4 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a+a \sin (c+d x)}}\right )}{a^{5/2} d}+\frac {149 \cot (c+d x)}{64 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {107 \cot (c+d x) \csc (c+d x)}{96 a^2 d \sqrt {a+a \sin (c+d x)}}+\frac {17 \cot (c+d x) \csc ^2(c+d x)}{24 a^2 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d \sqrt {a+a \sin (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 4.13, size = 414, normalized size = 1.81 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^5 \left ((-24576-24576 i) (-1)^{3/4} \tanh ^{-1}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \left (-1+\tan \left (\frac {1}{4} (c+d x)\right )\right )\right )-\frac {16 \csc ^{12}\left (\frac {1}{2} (c+d x)\right ) \left (6250 \cos \left (\frac {1}{2} (c+d x)\right )-4626 \cos \left (\frac {3}{2} (c+d x)\right )-1750 \cos \left (\frac {5}{2} (c+d x)\right )+894 \cos \left (\frac {7}{2} (c+d x)\right )+3267 \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-4356 \cos (2 (c+d x)) \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+1089 \cos (4 (c+d x)) \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-3267 \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+4356 \cos (2 (c+d x)) \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-1089 \cos (4 (c+d x)) \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-6250 \sin \left (\frac {1}{2} (c+d x)\right )-4626 \sin \left (\frac {3}{2} (c+d x)\right )+1750 \sin \left (\frac {5}{2} (c+d x)\right )+894 \sin \left (\frac {7}{2} (c+d x)\right )\right )}{\left (\csc ^2\left (\frac {1}{4} (c+d x)\right )-\sec ^2\left (\frac {1}{4} (c+d x)\right )\right )^4}\right )}{3072 d (a (1+\sin (c+d x)))^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 7.19, size = 200, normalized size = 0.87
method | result | size |
default | \(-\frac {\left (1+\sin \left (d x +c \right )\right ) \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, \left (1089 a^{7} \arctanh \left (\frac {\sqrt {-a \left (\sin \left (d x +c \right )-1\right )}}{\sqrt {a}}\right ) \left (\sin ^{4}\left (d x +c \right )\right )+447 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {7}{2}} a^{\frac {7}{2}}-1127 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {5}{2}} a^{\frac {9}{2}}-768 \sqrt {2}\, \arctanh \left (\frac {\sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{7} \left (\sin ^{4}\left (d x +c \right )\right )+1049 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {3}{2}} a^{\frac {11}{2}}-321 \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, a^{\frac {13}{2}}\right )}{192 a^{\frac {19}{2}} \sin \left (d x +c \right )^{4} \cos \left (d x +c \right ) \sqrt {a +a \sin \left (d x +c \right )}\, d}\) | \(200\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 643 vs.
\(2 (196) = 392\).
time = 0.39, size = 643, normalized size = 2.81 \begin {gather*} \frac {1089 \, {\left (\cos \left (d x + c\right )^{5} + \cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{3} - 2 \, \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \sin \left (d x + c\right ) + \cos \left (d x + c\right ) + 1\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, {\left (\cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right ) + 3\right )} \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right ) - 3\right )} \sqrt {a \sin \left (d x + c\right ) + a} \sqrt {a} - 9 \, a \cos \left (d x + c\right ) + {\left (a \cos \left (d x + c\right )^{2} + 8 \, a \cos \left (d x + c\right ) - a\right )} \sin \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1}\right ) + \frac {1536 \, \sqrt {2} {\left (a \cos \left (d x + c\right )^{5} + a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{3} - 2 \, a \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right ) + {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \sin \left (d x + c\right ) + a\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + \frac {2 \, \sqrt {2} \sqrt {a \sin \left (d x + c\right ) + a} {\left (\cos \left (d x + c\right ) - \sin \left (d x + c\right ) + 1\right )}}{\sqrt {a}} + 3 \, \cos \left (d x + c\right ) + 2}{\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) + 2\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 2}\right )}{\sqrt {a}} - 4 \, {\left (447 \, \cos \left (d x + c\right )^{4} - 214 \, \cos \left (d x + c\right )^{3} - 1244 \, \cos \left (d x + c\right )^{2} + {\left (447 \, \cos \left (d x + c\right )^{3} + 661 \, \cos \left (d x + c\right )^{2} - 583 \, \cos \left (d x + c\right ) - 845\right )} \sin \left (d x + c\right ) + 262 \, \cos \left (d x + c\right ) + 845\right )} \sqrt {a \sin \left (d x + c\right ) + a}}{768 \, {\left (a^{3} d \cos \left (d x + c\right )^{5} + a^{3} d \cos \left (d x + c\right )^{4} - 2 \, a^{3} d \cos \left (d x + c\right )^{3} - 2 \, a^{3} d \cos \left (d x + c\right )^{2} + a^{3} d \cos \left (d x + c\right ) + a^{3} d + {\left (a^{3} d \cos \left (d x + c\right )^{4} - 2 \, a^{3} d \cos \left (d x + c\right )^{2} + a^{3} d\right )} \sin \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.49, size = 256, normalized size = 1.12 \begin {gather*} -\frac {\sqrt {2} \sqrt {a} {\left (\frac {1089 \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}\right )}{a^{3} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} + \frac {1536 \, \log \left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{3} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {1536 \, \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{3} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {4 \, {\left (3576 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 4508 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 2098 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 321 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (2 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4} a^{3} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}\right )}}{768 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^4}{{\sin \left (c+d\,x\right )}^5\,{\left (a+a\,\sin \left (c+d\,x\right )\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________